package com.yanqu.road.entity.activity.hongxian;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Map;
import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_u_hong_xian_user_data")
public class HongXianUserData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "玩家ID", select = true, update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "次数限制的奖励，自选+随机")
    private Map<Integer, HongXianReward> selectReward;

    @FieldTypeAnnotation(desc = "回忆效果")
    private Map<Integer, HongXianMemory> poolDrawProcess;

    @FieldTypeAnnotation(desc = "总积分")
    private long score;

    @FieldTypeAnnotation(desc = "总抽数")
    private int drawTimes;

    @FieldTypeAnnotation(desc = "感悟次数")
    private int perception;

    @FieldTypeAnnotation(desc = "客户端动画")
    private String clientAnim = "";


    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public Map<Integer, HongXianReward> getSelectReward() {
        return selectReward;
    }

    public void setSelectReward(Map<Integer, HongXianReward> selectReward) {
        this.selectReward = selectReward;
        setUpdateOption();
    }

    public Map<Integer, HongXianMemory> getPoolDrawProcess() {
        return poolDrawProcess;
    }

    public void setPoolDrawProcess(Map<Integer, HongXianMemory> poolDrawProcess) {
        this.poolDrawProcess = poolDrawProcess;
        setUpdateOption();
    }

    public long getScore() {
        return score;
    }

    public void setScore(long score) {
        if(this.score != score) {
            this.score = score;
            setUpdateOption();
        }
    }

    public int getPerception() {
        return perception;
    }

    public void setPerception(int perception) {
        if(this.perception != perception) {
            this.perception = perception;
            setUpdateOption();
        }
    }

    public int getDrawTimes() {
        return drawTimes;
    }

    public void setDrawTimes(int drawTimes) {
        if(this.drawTimes != drawTimes) {
            this.drawTimes = drawTimes;
            setUpdateOption();
        }
    }

    public String getClientAnim() {
        return clientAnim;
    }

    public void setClientAnim(String clientAnim) {
        if(!Objects.equals(this.clientAnim, clientAnim)) {
            this.clientAnim = clientAnim;
            setUpdateOption();
        }
    }
}
